<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2018/5/5
 * Time: 18:11
 */

namespace app\index\controller;


use app\common\controller\HomeBase;
use app\common\model\Order as OrderModel;
class Order extends HomeBase{
    protected $order_model;

    protected function _initialize()
    {
        parent::_initialize();
        $this->order_model = new OrderModel();
    }
    public function addorder()
    {
        $params = input();
        $status = $this->order_model->add($params);
        if (!$status) {
            return ['code' => 0];
        }
        return ['code' => 1];
    }

}